<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');

class NvControllerAPIKey extends JController
{

	function display()
	{
	$mbuh = JRequest::getVar('task');
		if (empty($mbuh)||$mbuh=='cancel'){
			JRequest::setVar( 'view'  , 'apikey');
			JRequest::setVar( 'edit', false );
			
			parent::display();
		}else{
			JRequest::setVar( 'view'  , 'apikey');
			JRequest::setVar( 'edit', false );
			
			parent::display();
		}
	}

	function __construct(){
		parent::__construct();

	}


	function remove(){
		$model = $this->getModel('apikey');
		if(!$model->delete()) {
			$msg = JText::_( 'Data tidak bisa dihapus' );
		} else {
			$msg = JText::_( 'Data telah terhapus' );
		}

		$link = 'index.php?option=com_nv&view=apikey';
		$this->setRedirect($link,$msg);
	}

	
	
}
?>
